import { request } from 'umi';
export function getArticleList (page:number=2){
    return request('/api/article',{
        params:{
            page,
            pageSize:12,
            status:'publish'
        }
    })
} 
//文章推荐列表
export function getArticleRecommend (){
    return request('/api/article/recommend')
} 
//文章微信小程序
export function getAllArticleList (){
    return request('/api/article/all/recommend')
}
//归档页面数据
export function getArchives(){
    return request('/api/article/archives')
}
//获取文章页面条详情数据
export function getArticleViewList(id:string){
    return request(`/api/article/${id}/views`,{
        method:"POST"
    })
}
//文章tab切换之后数据getArticleCategoryFront

export function getArticleCategoryFront(page:number=1){
    return request(`/api/article/category/front`,{
        params:{
            page,
            pageSize:12,
            status:'publish'
        }
    })
}
//归档页面
export function getfiling (){
    return request('/api/article/archives')
}